#ifndef NEW_POP_WINDOW_H
#define NEW_POP_WINDOW_H

#include <QWidget>
#include "custom_message_box.h"

#include "common.h"
#include "device_information.h"
#include "custom_trans_widget.h"

namespace Ui {
class NewPopWindow;
}

class NewPopWindow : public CustomTransWidget
{
    Q_OBJECT
private:
    Ui::NewPopWindow *m_ui;

    PopWinStatus m_popWinStu = PopWinStatus::HIDE;
    CustomMessageBox *m_msg;
    QTimer *m_failTimeout = nullptr;
    QTimer *m_succeedTimeout = nullptr;
    DeviceInformation m_popDevInfo;

    void initUi();
    void initConnection();
    void setDevInfo(const QString &);
public:
    explicit NewPopWindow(const DeviceInformation &info, QWidget *parent = nullptr);
    ~NewPopWindow();
    void Show(const PopWinStatus &);
    
    void printTestMessageShow();
    PopWinStatus getPopWinStatus() const;

public slots:
    void onShowFailed();
    void onExit();
signals:
    void printTestRequest();
    void manualInstallRequest();
    void deviceViewRequest();
};

#endif // NEW_POP_WINDOW_H
